package com.pangsir.bookstore.dao.impl;

import com.pangsir.bookstore.dao.OrderItemDao;
import com.pangsir.bookstore.pojo.OrderItem;
import com.pangsir.myssm.basedao.BaseDAO;

public class OrderItemDaoImpl extends BaseDAO<OrderItem> implements OrderItemDao {
    @Override
    public void addOrderItem(OrderItem orderItem) {
        String sql = "insert into t_order_item value(0,?,?,?)";
        super.executeUpdate(sql,
                orderItem.getBook().getId(),
                orderItem.getBuyCount(),
                orderItem.getOrderBean().getId()
        );
    }
}
